using System;
using System.Collections.Generic;

namespace CKY.AgentPlatform.Services
{
    /// <summary>
    /// 提示词模板结果
    /// </summary>
    public class PromptTemplateResult
    {
        /// <summary>
        /// 处理后的提示词
        /// </summary>
        public string ProcessedPrompt { get; set; }

        /// <summary>
        /// 是否成功
        /// </summary>
        public bool IsSuccess { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        public string ErrorMessage { get; set; }

        /// <summary>
        /// 使用的变量
        /// </summary>
        public Dictionary<string, object> UsedVariables { get; set; }

        public PromptTemplateResult()
        {
            UsedVariables = new Dictionary<string, object>();
        }
    }

    /// <summary>
    /// 提示词模板服务接口
    /// </summary>
    public interface IPromptTemplateService
    {
        /// <summary>
        /// 应用模板
        /// </summary>
        Task<PromptTemplateResult> ApplyTemplateAsync(Guid templateId, Dictionary<string, object> variables);

        /// <summary>
        /// 获取模板
        /// </summary>
        Task<string> GetTemplateAsync(Guid templateId);

        /// <summary>
        /// 验证模板
        /// </summary>
        Task<bool> ValidateTemplateAsync(string template);
    }
}